from 测吧.src.week2.day4.game import *
def test_Hero(hero1,hero2):
    assert hero1.name == "hero1"
    assert hero2.name == "hero2"

    assert hero1.atk == 2
    assert hero2.atk == 1

    assert hero1.Lines() == "台词:我叫hero1"
    assert hero2.Lines() == "台词:我叫hero2"

    assert hero1.Get_hp() == 1
    assert hero2.Get_hp() == 10

def test_Master(hero1):
    assert hero1.mp == 3
    assert hero1.Put_skill() == 2

def test_Warrior(hero2):
    assert hero2.armor == 2

def test_Fight(hero1,hero2):
    assert Fight(hero1,hero2) == "hero2胜利!"


if __name__ == "__main__":
    hero1 = Master("hero1",1,2,3)
    hero2 = Warrior("hero2", 10, 1,2)

    test_Hero(hero1,hero2)
    test_Master(hero1)
    test_Warrior(hero2)
    test_Fight(hero1,hero2)